﻿@model Ducu.SRV.ViewModel.Shared._NavigatorModel
@{
    bool hasLogon = !string.IsNullOrEmpty(Model.UserName);
}
<style>
    .badge {
        margin-left: 4px;
        font-size: 10px;
    }

    .blink {
        color: white;
    }
</style>
<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="/"><img src="/Image/icon.png" class="img-rounded pull-left" style="margin: 0 20px;" /> </a>
            <a href="/Message/ToMe" id="hasNewMessage" style="display: none;">
                <span class="glyphicon glyphicon-bell navbar-brand" style="color: white;" id="message"></span>
            </a>
        </div>
        <div class="navbar-collapse collapse">
            <ul class="nav navbar-nav ">
                @if (hasLogon)
                {
                    @Html.Partial("_NeedFulfil")
                    @Html.Partial("_NeedAccept")
                    <li>@Html.ActionLink("求督促", "New", "Plan")</li>
                    <li>@Html.ActionLink("当督工", "Index", "Plan")</li>
                    @*<li><a href="/Setting">设置</a></li>*@
                    <li>
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
                            账户 <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="/User/Profile/@Model.UserId"><span class="glyphicon glyphicon-user"></span> @Model.UserName</a></li>
                            <li><a href="/Password/Change">修改密码</a></li>
                            <li><a href="/Log/Off?prepage=@ViewBag.PrepageUrl">退出登录</a></li>
                        </ul>
                    </li>
                }
                else
                {
                    <li>
                        <a href="/Log/On?prepage=@ViewBag.PrepageUrl">登录</a>
                    </li>
                    <li>
                        <a href="/Register?prepage=@ViewBag.PrepageUrl">注册</a>
                    </li>
                }
                <li>
                    <a class="dropdown-toggle" data-toggle="dropdown" href="/Help" role="button" aria-haspopup="true" aria-expanded="false">
                        帮助 <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="/About/Steps">新手村</a></li>
                        <li><a href="/About/FAQ">常见问题</a></li>
                        <li><a href="/Redbag/Practise">练习抢红包</a></li>
                        <li><a href="/About/Us">关于我们</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</div>
